<script lang="ts">
// 渲染函数：https://v3.cn.vuejs.org/guide/render-function.html
import { h, resolveComponent, defineComponent, Props } from 'vue';
export default defineComponent({
    name: 'svgIcon',
    props: {
        name: {
            type: String
        },
        size: {
            type: Number
        },
        color: {
            type: String
        }
    },
    setup(props:Props<{name: string, size:number, color: string}>) {
        if (props.name?.indexOf('element') > -1) {
			return () => h('i', { class: 'el-icon', style: `--font-size: ${props.size};--color: ${props.color}` }, [h(resolveComponent(props.name))]);
		} else {
			return () => h('i', { class: props.name, style: `font-size: ${props.size};color: ${props.color}` });
		}
    }
})
</script>
